-- GENERATED SPELL FOR [Skeld Drakeson] --


function spell0_23940(pUnit, Event) --@Berserker Charge,n/a--
pUnit:FullCastSpellOnTarget(19471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23940', 547, 1)
end

function spell1_23940(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_23940', 30334, 1)
end

function spell2_23940(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_23940', 580, 1)
end

function Sorts_23940(pUnit, Event)
local choix_sorts_23940 = math.random(0, 2)
if choix_sorts_23940 == 0 then
pUnit:RegisterEvent('spell0_23940', 1, 1)
end
if choix_sorts_23940 == 1 then
pUnit:RegisterEvent('spell1_23940', 1, 1)
end
if choix_sorts_23940 == 2 then
pUnit:RegisterEvent('spell2_23940', 1, 1)
end
end

function mob23940_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23940', math.random(1500, 3000), 1)
end

function mob23940_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23940_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23940_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23940, 1, 'mob23940_Action')
RegisterUnitEvent(23940, 2, 'mob23940_Leave')
RegisterUnitEvent(23940, 3, 'mob23940_Kill')
RegisterUnitEvent(23940, 4, 'mob23940_Die')
